import ColumnConversion from "./ColumnConversion.vue";

function registerComponents (Vue) {
  const modulesFiles = require.context(".", true, /\.vue$/);
  modulesFiles.keys().forEach((filePath) => {
    const componentFile = modulesFiles(filePath);
    const componentName = componentFile.default.name;
    if (!componentName) {
      console.log("组件名未设置", componentName, componentFile);
      return;
    }

    console.log("注册组件:", componentName, componentFile);
    Vue.component(componentName, componentFile.default);
  });
}

export default {
  install (Vue) {
    registerComponents(Vue);
  }
};
